package com.netease.spring.ch2;

import com.netease.spring.exceptions.PerformanceException;

public class PoeticJuggler extends Juggler {
    private Poem poem;

    /**
     * @return the poem
     */
    public Poem getPoem() {
        return poem;
    }

    /**
     * @param poem
     *            the poem to set
     */
    public void setPoem(Poem poem) {
        this.poem = poem;
    }

    public PoeticJuggler(Poem poem) {
        super();
        this.poem = poem;
    }

    public PoeticJuggler(int beanBags, Poem poem) {
        super(beanBags);
        this.poem = poem;
    }

    /*
     * (non-Javadoc)
     * @see com.netease.spring.ch2.Juggler#perform()
     */
    @Override
    public void perform() throws PerformanceException {
        // TODO Auto-generated method stub
        super.perform();
        System.out.println("while reciting");
        poem.recite();
    }

}
